
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>支付结果异步通知 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="cha-xun-jie-kou.html" />
    
    
    <link rel="prev" href="ding-dan-cha-xun-jie-kou.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    小蜜蜂支付接口文档
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="jie-kou-shuo-ming-1-2-1-sign-qian-ming.html">
            
                <a href="jie-kou-shuo-ming-1-2-1-sign-qian-ming.html">
            
                    
                    接口说明  Sign 签名 
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="shua-qia-zhi-4ed828-shou-quan-er-wei-780129.html">
            
                <a href="shua-qia-zhi-4ed828-shou-quan-er-wei-780129.html">
            
                    
                    刷卡支付(授权二维码) 
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="dong-tai-ding-dan-sao-ma-zhi-fu-jie-kou.html">
            
                <a href="dong-tai-ding-dan-sao-ma-zhi-fu-jie-kou.html">
            
                    
                    动态订单扫码支付接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="ding-dan-cha-xun-jie-kou.html">
            
                <a href="ding-dan-cha-xun-jie-kou.html">
            
                    
                    H5支付/小程序支付接口
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.6" data-path="zhi-fu-jie-guo-yi-bu-tong-zhi.html">
            
                <a href="zhi-fu-jie-guo-yi-bu-tong-zhi.html">
            
                    
                    支付结果异步通知
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="cha-xun-jie-kou.html">
            
                <a href="cha-xun-jie-kou.html">
            
                    
                    订单查询接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="ding-dan-che-xiao-jie-kou-paycancel.html">
            
                <a href="ding-dan-che-xiao-jie-kou-paycancel.html">
            
                    
                    订单撤销接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="ding-dan-guan-bi-jie-kou.html">
            
                <a href="ding-dan-guan-bi-jie-kou.html">
            
                    
                    订单关闭接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="tui-kuan-jie-kou.html">
            
                <a href="tui-kuan-jie-kou.html">
            
                    
                    退款接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="tui-kuan-cha-xun-jie-kou.html">
            
                <a href="tui-kuan-cha-xun-jie-kou.html">
            
                    
                    退款查询接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="wei-xin-zi-shang-hu-zhi-fu-pei-zhi-jie-kou.html">
            
                <a href="wei-xin-zi-shang-hu-zhi-fu-pei-zhi-jie-kou.html">
            
                    
                    微信子商户支付配置接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="wei-xin-zi-shang-hu-zhi-fu-mu-lu-pei-zhi-jie-kou.html">
            
                <a href="wei-xin-zi-shang-hu-zhi-fu-mu-lu-pei-zhi-jie-kou.html">
            
                    
                    微信子商户支付目录配置接口
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >支付结果异步通知</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x652F;&#x4ED8;&#x7ED3;&#x679C;&#x5F02;&#x6B65;&#x901A;&#x77E5;">&#x652F;&#x4ED8;&#x7ED3;&#x679C;&#x5F02;&#x6B65;&#x901A;&#x77E5;</h1>
<p><strong>&#x9488;&#x5BF9;&#x5BA2;&#x6237;&#x4E3B;&#x626B;&#x652F;&#x4ED8;&#xFF08;&#x5305;&#x62EC;H5&#x652F;&#x4ED8;&#x4E3B;&#x626B;&#x548C;&#x52A8;&#x6001;&#x8BA2;&#x5355;&#x626B;&#x7801;&#x652F;&#x4ED8;&#xFF09;&#xFF0C;&#x5C0F;&#x871C;&#x8702;&#x5728;&#x83B7;&#x77E5;&#x5BA2;&#x6237;&#x4EA4;&#x6613;&#x7ED3;&#x679C;&#x540E;&#xFF0C;&#x4F1A;&#x4E3B;&#x52A8;&#x5C06;&#x7ED3;&#x679C;&#x901A;&#x77E5;&#x5408;&#x4F5C;&#x65B9;&#x3002;&#x901A;&#x77E5;&#x6D88;&#x606F;&#x53EA;&#x5305;&#x62EC;&#x4E3B;&#x8981;&#x4E1A;&#x52A1;&#x6570;&#x636E;&#xFF0C;&#x5982;&#x679C;&#x9700;&#x8981;&#x67E5;&#x8BE2;&#x5B8C;&#x6574;&#x4E1A;&#x52A1;&#x6570;&#x636E;&#xFF0C;&#x9700;&#x8981;&#x8C03;&#x7528;&#x3010;&#x8BA2;&#x5355;&#x67E5;&#x8BE2;&#x3011;&#x63A5;&#x53E3;&#x3002;&#x5728;&#x6536;&#x5230;&#x5C0F;&#x871C;&#x8702;&#x7684;&#x7ED3;&#x679C;&#x901A;&#x77E5;&#x540E;&#xFF0C;&#x5408;&#x4F5C;&#x65B9;&#x987B;&#x505A;&#x51FA;&#x5E94;&#x7B54;&#x3002;&#x5982;&#x679C;&#x6536;&#x5230;&#x7684;&#x5408;&#x4F5C;&#x65B9;&#x5E94;&#x7B54;&#x4E0D;&#x662F;&#x6210;&#x529F;&#x6216;&#x8D85;&#x65F6;&#xFF0C;&#x5C0F;&#x871C;&#x8702;&#x7CFB;&#x7EDF;&#x8BA4;&#x4E3A;&#x901A;&#x77E5;&#x5931;&#x8D25;&#xFF0C;&#x901A;&#x8FC7;&#x4E00;&#x5B9A;&#x7684;&#x7B56;&#x7565;&#x5B9A;&#x671F;&#x91CD;&#x65B0;&#x53D1;&#x8D77;&#x901A;&#x77E5;&#xFF0C;&#x5C3D;&#x53EF;&#x80FD;&#x63D0;&#x9AD8;&#x901A;&#x77E5;&#x7684;&#x6210;&#x529F;&#x7387;&#xFF0C;&#x4F46;&#x4E0D;&#x4FDD;&#x8BC1;&#x901A;&#x77E5;&#x6700;&#x7EC8;&#x80FD;&#x6210;&#x529F;&#x3002;(&#x901A;&#x77E5;&#x9891;&#x7387;&#x4E3A;0/15/15/30/&#xFF0C;&#x6700;&#x591A;&#x901A;&#x77E5;4&#x6B21;&#xFF0C;&#x5355;&#x4F4D;&#xFF1A;&#x79D2;&#xFF09;</strong></p>
<p>&#x4EC5;&#x5F53;&#x4E3B;&#x626B;&#x7684;&#x8BA2;&#x5355;&#x6210;&#x529F;&#x540E;&#x624D;&#x8FDB;&#x884C;&#x7ED3;&#x679C;&#x901A;&#x77E5;&#xFF0C;&#x5931;&#x8D25;&#x548C;&#x5904;&#x7406;&#x4E2D;&#x5747;&#x4E0D;&#x901A;&#x77E5;</p>
<p>&#x5F02;&#x6B65;&#x901A;&#x77E5;&#x53C2;&#x6570;&#xFF1A;OutTradeNo &#xFF0C;TotalAmount&#xFF0C;ShopNo&#xFF0C;NonceStr&#xFF0C;Sign</p>
<p>&#x7B7E;&#x540D;&#x8BF7;&#x53C2;&#x8003;&#x3010;&#x63A5;&#x53E3;&#x8BF4;&#x660E;  Sign &#x7B7E;&#x540D; &#x3011;</p>
<p>&#x4EE5;&#x4E0B;&#x662F;php &#x4EE3;&#x7801;&#x793A;&#x4F8B;</p>
<pre><code class="lang-php">$post = $_POST;
<span class="hljs-keyword">if</span>(checkSign($post,<span class="hljs-string">&quot;fd8f28ea8369b61ac9ba6ea871addfc4&quot;</span>)){  <span class="hljs-comment">//&#x8FD9;&#x91CC;&#x5904;&#x7406;&#x4F60;&#x7684;&#x4E1A;&#x52A1;&#x903B;&#x8F91;</span>
}
</code></pre>
<pre><code class="lang-php"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">checkSign</span><span class="hljs-params">($data=[],$secret)</span></span>{
     $sign = $data[<span class="hljs-string">&apos;Sign&apos;</span>];

    <span class="hljs-keyword">unset</span>($data[<span class="hljs-string">&apos;Sign&apos;</span>]);

    ksort($data);

    $singStr = http_build_query($data).<span class="hljs-string">&quot;&amp;secret=&quot;</span>.$secret;

     <span class="hljs-keyword">return</span> md5($singStr) == $sign;

}
</code></pre>
<p>&#x652F;&#x4ED8;&#x79D8;&#x94A5;&#x4E0E;&#x56DE;&#x8C03;&#x5730;&#x5740;&#x8BBE;&#x7F6E;&#xFF1A;</p>
<p><a href="https://www.bestsmartbee.com/admin/shop/paySetting" target="_blank">https://www.bestsmartbee.com/admin/shop/paySetting</a></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="ding-dan-cha-xun-jie-kou.html" class="navigation navigation-prev " aria-label="Previous page: H5支付/小程序支付接口">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="cha-xun-jie-kou.html" class="navigation navigation-next " aria-label="Next page: 订单查询接口">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"支付结果异步通知","level":"1.6","depth":1,"next":{"title":"订单查询接口","level":"1.7","depth":1,"path":"cha-xun-jie-kou.md","ref":"cha-xun-jie-kou.md","articles":[]},"previous":{"title":"H5支付/小程序支付接口","level":"1.5","depth":1,"path":"ding-dan-cha-xun-jie-kou.md","ref":"ding-dan-cha-xun-jie-kou.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"zhi-fu-jie-guo-yi-bu-tong-zhi.md","mtime":"2019-05-30T08:58:12.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-05-31T01:17:36.974Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

